package com.project.thisDatabase.redis;

import com.project.annotation.function.RedisCommonExecutor;
import com.project.annotation.model.RedisBaseSetting;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
import java.util.Map;

@Data
public class RedisInnerExecutor extends RedisExecutor implements RedisCommonExecutor {

    @Override
    public Boolean addStringNx(String s, Long aLong) {
        return super.addStringNx(StringUtils.EMPTY, s, aLong);
    }

    @Override
    public void addStringTimeout(String key, String s) {
        super.addString(key, s, getTimeout());
    }

    @Override
    public void addString(String s) {
        super.addString(StringUtils.EMPTY, s, getTimeout());
    }

    @Override
    public void addString(String s, Long aLong) {
        super.addString(StringUtils.EMPTY, s, aLong);
    }

    @Override
    public void addHashObjectTimeout(String key, String s, Object o) {
        super.addMap(key, s, o, getTimeout());
    }

    @Override
    public void addHashObject(String s, Object o) {
        super.addMap(StringUtils.EMPTY, s, o, getTimeout());
    }

    @Override
    public void addHashObject(String s, Object o, Long aLong) {
        super.addMap(StringUtils.EMPTY, s, o, aLong);
    }

    public void addObjectTimeout(String key, Object o) {
        super.addObject(key, o, getTimeout());
    }

    @Override
    public void addObject(Object o) {
        super.addObject(StringUtils.EMPTY, o, getTimeout());
    }

    @Override
    public void addObject(Object o, Long aLong) {
        super.addObject(StringUtils.EMPTY, o, aLong);
    }

    @Override
    public void addHashStringTimeout(String key, String s, String s1) {
        super.addHashMap(key, s, s1, getTimeout());
    }

    @Override
    public void addHashString(String s, String s1) {
        super.addHashMap(StringUtils.EMPTY, s, s1, getTimeout());
    }

    @Override
    public void addHashString(String s, String s1, Long aLong) {
        super.addHashMap(StringUtils.EMPTY, s, s1, aLong);
    }

    @Override
    public void deleteByKey() {
        super.deleteByKey(StringUtils.EMPTY);
    }

    @Override
    public String getByKey() {
        return super.getByKey(StringUtils.EMPTY);
    }

    @Override
    public <T> T getObjectByKey(Class aClass) {
        return super.getObjectByKey(StringUtils.EMPTY, aClass);
    }

    @Override
    public void addMapTimeout(String key, String s, Object o) {
        super.addMap(key, s, o, getTimeout());
    }

    @Override
    public void addMap(String s, Object o) {
        super.addMap(StringUtils.EMPTY, s, o, getTimeout());
    }

    @Override
    public void addMap(String s, Object o, Long aLong) {
        super.addMap(StringUtils.EMPTY, s, o, aLong);
    }

    @Override
    public void addMap(Map map) {
        super.addMap(StringUtils.EMPTY, map);
    }

    @Override
    public void addHashMapTimeout(String key, String s, String s1) {
        super.addHashMap(key, s, s1, getTimeout());
    }

    @Override
    public void addHashMap(String s, String s1) {
        super.addHashMap(StringUtils.EMPTY, s, s1, getTimeout());
    }

    @Override
    public void addHashMap(String s, String s1, Long aLong) {
        super.addHashMap(StringUtils.EMPTY, s, s1, aLong);
    }

    @Override
    public String getHashMap(String s) {
        return super.getHashMap(StringUtils.EMPTY, s);
    }

    @Override
    public <T> T getHashMapObject(String s, Class aClass) {
        return super.getHashMapObject(StringUtils.EMPTY, s, aClass);
    }

    @Override
    public void deleteMap(String s) {
        super.deleteMap(StringUtils.EMPTY, s);
    }

    @Override
    public Boolean hasMapKey(String s) {
        return super.hasMapKey(StringUtils.EMPTY, s);
    }

    @Override
    public String getMap(String s) {
        return super.getMap(StringUtils.EMPTY, s);
    }

    @Override
    public boolean addSet(String s) {
        return super.addSet(StringUtils.EMPTY, s);
    }

    @Override
    public boolean hasSetKey(String s) {
        return super.hasSetKey(StringUtils.EMPTY, s);
    }

    @Override
    public void addListTimeout(String key, String s) {
        super.addList(key, s, getTimeout());
    }

    @Override
    public void addList(String s) {
        super.addList(StringUtils.EMPTY, s, getTimeout());
    }

    @Override
    public void addList(String s, Long aLong) {
        super.addList(StringUtils.EMPTY, s, aLong);
    }

    @Override
    public void addListByObjectTimeout(String key, Object o) {
        super.addListByObject(key, o, getTimeout());
    }

    @Override
    public void addListByObject(Object o) {
        super.addListByObject(StringUtils.EMPTY, o, getTimeout());
    }

    @Override
    public void addListByObject(Object o, Long aLong) {
        super.addListByObject(StringUtils.EMPTY, o, aLong);
    }

    @Override
    public List<Object> getList() {
        return super.getList(StringUtils.EMPTY);
    }

    @Override
    public <T> List<T> getList(Class aClass) {
        return super.getList(StringUtils.EMPTY, aClass);
    }

    @Override
    public void deleteList() {
        super.deleteList(StringUtils.EMPTY);
    }

    @Override
    public void setExpireDays(int i) {
        super.setExpireDays(StringUtils.EMPTY, i);
    }

    @Override
    public void setExpireMinutes(int i) {
        super.setExpireMinutes(StringUtils.EMPTY, i);
    }

    @Override
    public void setExpireSeconds(int i) {
        super.setExpireSeconds(StringUtils.EMPTY, i);
    }

    @Override
    public void setExpireMilliseconds(long l) {
        super.setExpireMilliseconds(StringUtils.EMPTY, l);
    }

    @Override
    public Boolean addStringNx(String s) {
        return super.addStringNx(StringUtils.EMPTY, s, getTimeout());
    }
}
